import { ClassUI, ClassView } from "../gui/UIDefine";
import EventType from "../../model/EventType";

export default class EventManage extends Laya.EventDispatcher {

    private static _instance: EventManage;
    public static get I() { return this._instance ?? (this._instance = new EventManage()) }

    closeUI(ui: ClassView<any, any> | number, c?: any) {
        let gid = typeof ui === "number" ? ui : ui["__GID"]();
        this.event(EventType.CLOSE_UI, [gid, c]);
    }
}